package 第五章重载;

//方法重载的应用
public class OverLoad04 {

    public static void main(String[] args) {
        P.p(1);
        P.p("hello world");
    }

    public static class P {
        public static void p(int a) {
            System.out.println(a);
        }

        public static void p(byte a) {
            System.out.println(a);
        }

        public static void p(short a) {
            System.out.println(a);
        }

        public static void p(long a) {
            System.out.println(a);
        }

        public static void p(float a) {
            System.out.println(a);
        }

        public static void p(double a) {
            System.out.println(a);
        }

        public static void p(char a) {
            System.out.println(a);
        }

        public static void p(boolean a) {
            System.out.println(a);
        }

        public static void p(String a) {
            System.out.println("a");
        }
    }
}

